Add some missing (nullable) annotations
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 22 Sep 2016 11:56:47 +0000 (13:56 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 22 Sep 2016 12:02:07 +0000 (14:02 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=771826

19 files changed:
gdk/gdkdisplay.c
gdk/gdkdnd.c
gdk/gdkglcontext.c
gdk/gdkkeys.c
gtk/deprecated/gtknumerableicon.c
gtk/deprecated/gtkstatusicon.c
gtk/deprecated/gtkstyle.c
gtk/deprecated/gtkthemingengine.c
gtk/gtkactionable.c
gtk/gtkcellrenderer.c
gtk/gtkcsscustomproperty.c
gtk/gtkdragdest.c
gtk/gtkicontheme.c
gtk/gtkrecentmanager.c
gtk/gtkstylecontext.c
gtk/gtkstyleproperty.c
gtk/gtkstyleprovider.c
gtk/gtkwidgetpath.c
gtk/gtkwindow.c

index f771564e5b2d7324ed57394b10b153911116b6af..ed0e65f956c33fbf537254ecb824276ff9ec6af3 100644 (file)
@@ -1792,7 +1792,7 @@ gdk_display_supports_clipboard_persistence (GdkDisplay *display)
  * @display:          a #GdkDisplay
  * @clipboard_window: a #GdkWindow belonging to the clipboard owner
  * @time_:            a timestamp
- * @targets:          (array length=n_targets): an array of targets
+ * @targets:          (array length=n_targets) (nullable): an array of targets
  *                    that should be saved, or %NULL
  *                    if all available targets should be saved.
  * @n_targets:        length of the @targets array
@@ -2570,7 +2570,7 @@ get_fallback_monitor (GdkDisplay *display)
  *
  * Gets a monitor associated with this display.
  *
- * Returns: (transfer none): the #GdkMonitor, or %NULL if
+ * Returns: (nullable) (transfer none): the #GdkMonitor, or %NULL if
  *    @monitor_num is not a valid monitor number
  * Since: 3.22
  */
@@ -2597,7 +2597,7 @@ gdk_display_get_monitor (GdkDisplay *display,
  * manager to place the windows, specialized desktop applications
  * such as panels should place themselves on the primary monitor.
  *
- * Returns: (transfer none): the primary monitor, or %NULL if no primary
+ * Returns: (nullable) (transfer none): the primary monitor, or %NULL if no primary
  *     monitor is configured by the user
  * Since: 3.22
  */
index 163a705ee05ce809592e0cda3bbcdc99a69303a5..d0629cfb7e285b987df47cb3d02a364d458a255d 100644 (file)
@@ -592,7 +592,7 @@ gdk_drag_get_selection (GdkDragContext *context)
  * The window is owned by @context and will be destroyed when
  * the drag operation is over.
  *
- * Returns: (transfer none): the drag window, or %NULL
+ * Returns: (nullable) (transfer none): the drag window, or %NULL
  *
  * Since: 3.20
  */
index 40addbccaefb5a595837a9f0a1d30f2b0d3bb2ee..bf6e45f5a255164464aae134d68f898fcd15b6ba 100644 (file)
@@ -873,7 +873,7 @@ gdk_gl_context_make_current (GdkGLContext *context)
  *
  * Retrieves the #GdkDisplay the @context is created for
  *
- * Returns: (transfer none): a #GdkDisplay or %NULL
+ * Returns: (nullable) (transfer none): a #GdkDisplay or %NULL
  *
  * Since: 3.16
  */
@@ -893,7 +893,7 @@ gdk_gl_context_get_display (GdkGLContext *context)
  *
  * Retrieves the #GdkWindow used by the @context.
  *
- * Returns: (transfer none): a #GdkWindow or %NULL
+ * Returns: (nullable) (transfer none): a #GdkWindow or %NULL
  *
  * Since: 3.16
  */
@@ -913,7 +913,7 @@ gdk_gl_context_get_window (GdkGLContext *context)
  *
  * Retrieves the #GdkGLContext that this @context share data with.
  *
- * Returns: (transfer none): a #GdkGLContext or %NULL
+ * Returns: (nullable) (transfer none): a #GdkGLContext or %NULL
  *
  * Since: 3.16
  */
@@ -985,7 +985,7 @@ gdk_gl_context_clear_current (void)
  *
  * Retrieves the current #GdkGLContext.
  *
- * Returns: (transfer none): the current #GdkGLContext, or %NULL
+ * Returns: (nullable) (transfer none): the current #GdkGLContext, or %NULL
  *
  * Since: 3.16
  */
index d7f76a9513d993a567d6ace0137ea3d00b1a1b4a..467e063ad554268399394cf1313dbf9b48b80f64 100644 (file)
@@ -437,9 +437,9 @@ gdk_keymap_get_entries_for_keyval (GdkKeymap     *keymap,
  * gdk_keymap_get_entries_for_keycode:
  * @keymap: a #GdkKeymap
  * @hardware_keycode: a keycode
- * @keys: (out) (array length=n_entries) (transfer full): return
+ * @keys: (out) (array length=n_entries) (transfer full) (optional): return
  *     location for array of #GdkKeymapKey, or %NULL
- * @keyvals: (out) (array length=n_entries) (transfer full): return
+ * @keyvals: (out) (array length=n_entries) (transfer full) (optional): return
  *     location for array of keyvals, or %NULL
  * @n_entries: length of @keys and @keyvals
  *
index 7f63f4da310609895ba194c89c6ee40362eeefa9..7527c5e977a2653e3c072825343f868804178901 100644 (file)
@@ -713,7 +713,7 @@ _gtk_numerable_icon_set_background_icon_size (GtkNumerableIcon *self,
  *
  * Returns the currently displayed label of the icon, or %NULL.
  *
- * Returns: the currently displayed label
+ * Returns: (nullable): the currently displayed label
  *
  * Since: 3.0
  *
@@ -825,7 +825,7 @@ gtk_numerable_icon_set_count (GtkNumerableIcon *self,
  * Returns the #GtkStyleContext used by the icon for theming,
  * or %NULL if there’s none.
  *
- * Returns: (transfer none): a #GtkStyleContext, or %NULL.
+ * Returns: (nullable) (transfer none): a #GtkStyleContext, or %NULL.
  *     This object is internal to GTK+ and should not be unreffed.
  *     Use g_object_ref() if you want to keep it around
  *
@@ -919,7 +919,7 @@ gtk_numerable_icon_set_background_gicon (GtkNumerableIcon *self,
  * %NULL if there’s none. The caller of this function does not own
  * a reference to the returned #GIcon.
  *
- * Returns: (transfer none): a #GIcon, or %NULL
+ * Returns: (nullable) (transfer none): a #GIcon, or %NULL
  *
  * Since: 3.0
  *
@@ -992,7 +992,7 @@ gtk_numerable_icon_set_background_icon_name (GtkNumerableIcon *self,
  * Returns the icon name used as the base background image,
  * or %NULL if there’s none.
  *
- * Returns: an icon name, or %NULL
+ * Returns: (nullable): an icon name, or %NULL
  *
  * Since: 3.0
  *
index 7df11cdec1693624e9ef65f087194fb659454e04..b33a2967518a7b6c38a63b322a5d834d01c4b4db 100644 (file)
@@ -1919,7 +1919,7 @@ gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon)
  * The caller of this function does not own a reference to the
  * returned pixbuf.
  * 
- * Returns: (transfer none): the displayed pixbuf,
+ * Returns: (nullable) (transfer none): the displayed pixbuf,
  *     or %NULL if the image is empty.
  *
  * Since: 2.10
@@ -1948,7 +1948,7 @@ gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon)
  * The returned string is owned by the #GtkStatusIcon and should not
  * be freed or modified.
  * 
- * Returns: stock id of the displayed stock icon,
+ * Returns: (nullable): stock id of the displayed stock icon,
  *   or %NULL if the image is empty.
  *
  * Since: 2.10
@@ -1977,7 +1977,7 @@ gtk_status_icon_get_stock (GtkStatusIcon *status_icon)
  * The returned string is owned by the #GtkStatusIcon and should not
  * be freed or modified.
  * 
- * Returns: name of the displayed icon, or %NULL if the image is empty.
+ * Returns: (nullable): name of the displayed icon, or %NULL if the image is empty.
  *
  * Since: 2.10
  *
@@ -2007,7 +2007,7 @@ gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon)
  *
  * If this function fails, @icon is left unchanged;
  *
- * Returns: (transfer none): the displayed icon, or %NULL if the image is empty
+ * Returns: (nullable) (transfer none): the displayed icon, or %NULL if the image is empty
  *
  * Since: 2.14
  *
@@ -2582,7 +2582,7 @@ gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon,
  *
  * Gets the contents of the tooltip for @status_icon.
  *
- * Returns: the tooltip text, or %NULL. You should free the
+ * Returns: (nullable): the tooltip text, or %NULL. You should free the
  *   returned string with g_free() when done.
  *
  * Since: 2.16
@@ -2672,7 +2672,7 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
  *
  * Gets the contents of the tooltip for @status_icon.
  *
- * Returns: the tooltip text, or %NULL. You should free the
+ * Returns: (nullable): the tooltip text, or %NULL. You should free the
  *   returned string with g_free() when done.
  *
  * Since: 2.16
index 291e5c2306e03c4ceb943ede7b74ca6026638433..9477578fef2f14601209fd391e5ff53733eec604 100644 (file)
@@ -4752,7 +4752,7 @@ gtk_widget_class_path (GtkWidget *widget,
  * the application and should not be modified. The pixbuf should be
  * freed after use with g_object_unref().
  *
- * Returns: (transfer full): a new pixbuf, or %NULL if the
+ * Returns: (nullable) (transfer full): a new pixbuf, or %NULL if the
  *     stock ID wasn’t known
  *
  * Deprecated: 3.0: Use gtk_widget_render_icon_pixbuf() instead.
index e26e8078e6cad373ca76e7a77f7895078f2f17ec..24dbc79ad3b92e4b75510b9ad3af334933bff83d 100644 (file)
@@ -951,7 +951,7 @@ gtk_theming_module_init (GtkThemingModule *module)
  * Loads and initializes a theming engine module from the
  * standard directories.
  *
- * Returns: (transfer none): A theming engine, or %NULL if
+ * Returns: (nullable) (transfer none): A theming engine, or %NULL if
  * the engine @name doesn’t exist.
  *
  * Deprecated: 3.14
@@ -1004,7 +1004,7 @@ gtk_theming_engine_load (const gchar *name)
  *
  * Returns the #GdkScreen to which @engine currently rendering to.
  *
- * Returns: (transfer none): a #GdkScreen, or %NULL.
+ * Returns: (nullable) (transfer none): a #GdkScreen, or %NULL.
  *
  * Deprecated: 3.14
  **/
index c28fae2556dca2c69c1f8e392ddf2c5322dede5d..e12936a834f375b400de0330e55589d811bbe8e2 100644 (file)
@@ -102,7 +102,7 @@ gtk_actionable_get_action_name (GtkActionable *actionable)
 /**
  * gtk_actionable_set_action_name:
  * @actionable: a #GtkActionable widget
- * @action_name: an action name, or %NULL
+ * @action_name: (nullable): an action name, or %NULL
  *
  * Specifies the name of the action with which this widget should be
  * associated.  If @action_name is %NULL then the widget will be
index 58969d4b10f89585fb82bd3e7eaf77994893cec5..163b8962ddf9af999e9c0546e5e72f2409d7967a 100644 (file)
@@ -883,7 +883,7 @@ gtk_cell_renderer_activate (GtkCellRenderer      *cell,
 /**
  * gtk_cell_renderer_start_editing:
  * @cell: a #GtkCellRenderer
- * @event: a #GdkEvent
+ * @event: (nullable): a #GdkEvent
  * @widget: widget that received the event
  * @path: widget-dependent string representation of the event location;
  *    e.g. for #GtkTreeView, a string representation of #GtkTreePath
@@ -1792,8 +1792,8 @@ gtk_cell_renderer_get_aligned_area (GtkCellRenderer      *cell,
 
 /**
  * gtk_cell_renderer_get_state:
- * @cell: a #GtkCellRenderer, or %NULL
- * @widget: a #GtkWidget, or %NULL
+ * @cell: (nullable): a #GtkCellRenderer, or %NULL
+ * @widget: (nullable): a #GtkWidget, or %NULL
  * @cell_state: cell renderer state
  *
  * Translates the cell renderer state to #GtkStateFlags,
index f210ad397ba02b63f3229c16a5b33ad7a9384381..59205dd2dd7ad708b3be64ce63aa3e2c01cd0b38 100644 (file)
@@ -209,7 +209,7 @@ gtk_theming_engine_register_property (const gchar            *name_space,
 
 /**
  * gtk_style_properties_register_property: (skip)
- * @parse_func: parsing function to use, or %NULL
+ * @parse_func: (nullable): parsing function to use, or %NULL
  * @pspec: the #GParamSpec for the new property
  *
  * Registers a property so it can be used in the CSS file format.
index 9a679e780117939d86cfbdfeffa9552e3f3a7096..8f4261b4c853eb94966ce93518864be15da555a7 100644 (file)
@@ -250,7 +250,7 @@ gtk_drag_dest_unset (GtkWidget *widget)
  * Returns the list of targets this widget can accept from
  * drag-and-drop.
  *
- * Returns: (transfer none): the #GtkTargetList, or %NULL if none
+ * Returns: (nullable) (transfer none): the #GtkTargetList, or %NULL if none
  */
 GtkTargetList *
 gtk_drag_dest_get_target_list (GtkWidget *widget)
index 8ebf652d4f43e13d7d6cb4aec6570ffd2b9edf16..63b6f238a7798e5d318ed57d8f46df9397f97085 100644 (file)
@@ -3662,7 +3662,7 @@ gtk_icon_info_get_filename (GtkIconInfo *icon_info)
  * built in icon images, you must pass the %GTK_ICON_LOOKUP_USE_BUILTIN
  * to gtk_icon_theme_lookup_icon().
  *
- * Returns: (transfer none): the built-in image pixbuf, or %NULL.
+ * Returns: (nullable) (transfer none): the built-in image pixbuf, or %NULL.
  *     No extra reference is added to the returned pixbuf, so if
  *     you want to keep it around, you must use g_object_ref().
  *     The returned image must not be modified.
index 2f01e3de8d78017656cb3dea59e2887c5d232e36..1157eec3eab0c64ac97774838386425299bd9372 100644 (file)
@@ -1968,7 +1968,7 @@ get_icon_fallback (const gchar *icon_name,
  *
  * Retrieves the icon of size @size associated to the resource MIME type.
  *
- * Returns: (transfer full): a #GdkPixbuf containing the icon,
+ * Returns: (nullable) (transfer full): a #GdkPixbuf containing the icon,
  *     or %NULL. Use g_object_unref() when finished using the icon.
  *
  * Since: 2.10
@@ -2003,7 +2003,7 @@ gtk_recent_info_get_icon (GtkRecentInfo *info,
  *
  * Retrieves the icon associated to the resource MIME type.
  *
- * Returns: (transfer full): a #GIcon containing the icon, or %NULL.
+ * Returns: (nullable) (transfer full): a #GIcon containing the icon, or %NULL.
  *   Use g_object_unref() when finished using the icon
  *
  * Since: 2.22
@@ -2266,7 +2266,7 @@ gtk_recent_info_get_short_name (GtkRecentInfo *info)
  * is local, it returns a local path; if the resource is not local,
  * it returns the UTF-8 encoded content of gtk_recent_info_get_uri().
  *
- * Returns: a newly allocated UTF-8 string containing the
+ * Returns: (nullable): a newly allocated UTF-8 string containing the
  *   resource’s URI or %NULL. Use g_free() when done using it.
  *
  * Since: 2.10
@@ -2427,7 +2427,7 @@ gtk_recent_info_has_group (GtkRecentInfo *info,
  *
  * Creates a #GAppInfo for the specified #GtkRecentInfo
  *
- * Returns: (transfer full): the newly created #GAppInfo, or %NULL.
+ * Returns: (nullable) (transfer full): the newly created #GAppInfo, or %NULL.
  *   In case of error, @error will be set either with a
  *   %GTK_RECENT_MANAGER_ERROR or a %G_IO_ERROR
  */
index 03a16aac49df597166699c6b4f9bea4b9d79f019..aa80b7312c7055c0755c66c5ea9969f081d9ab7b 100644 (file)
@@ -939,7 +939,7 @@ gtk_style_context_set_id (GtkStyleContext *context,
  *
  * Returns the CSS ID used when obtaining style information.
  *
- * Returns: the ID or %NULL if no ID is set.
+ * Returns: (nullable): the ID or %NULL if no ID is set.
  **/
 const char *
 gtk_style_context_get_id (GtkStyleContext *context)
@@ -1930,7 +1930,7 @@ gtk_style_context_get_style (GtkStyleContext *context,
  * the default icon factory, returning an icon set if found, otherwise
  * %NULL.
  *
- * Returns: (transfer none): The looked  up %GtkIconSet, or %NULL
+ * Returns: (nullable) (transfer none): The looked up %GtkIconSet, or %NULL
  *
  * Deprecated: 3.10: Use gtk_icon_theme_lookup_icon() instead.
  **/
index 9639ae44c029749dcb999ee3694077da4c59cd64..e79849bd28097b57ebd07aca07063cfe82bdf183 100644 (file)
@@ -260,7 +260,7 @@ _gtk_style_property_add_alias (const gchar *name,
  * Looks up the CSS property with the given @name. If no such
  * property exists, %NULL is returned.
  *
- * Returns: (transfer none): The property or %NULL if no
+ * Returns: (nullable) (transfer none): The property or %NULL if no
  *     property with the given name exists.
  **/
 GtkStyleProperty *
index fab975a173ed6a199a867651a278ffa9ccdeb144..d522b58439f00e73d4a500e1915fa7b8715cc137 100644 (file)
@@ -62,7 +62,7 @@ gtk_style_provider_iface_init (gpointer g_iface)
  * Returns the style settings affecting a widget defined by @path, or %NULL if
  * @provider doesn’t contemplate styling @path.
  *
- * Returns: (transfer full): a #GtkStyleProperties containing the
+ * Returns: (nullable) (transfer full): a #GtkStyleProperties containing the
  * style settings affecting @path
  *
  * Since: 3.0
@@ -132,7 +132,7 @@ gtk_style_provider_get_style_property (GtkStyleProvider *provider,
  * Returns the #GtkIconFactory defined to be in use for @path, or %NULL if none
  * is defined.
  *
- * Returns: (transfer none): The icon factory to use for @path, or %NULL
+ * Returns: (nullable) (transfer none): The icon factory to use for @path, or %NULL
  *
  * Since: 3.0
  *
index 2a5ad1987144bd350375abdcc9a44ee1f8efdd5e..ae4d0576df66ccbbcb4ce599509807d7d5e439dc 100644 (file)
@@ -523,7 +523,7 @@ gtk_widget_path_iter_get_sibling_index (const GtkWidgetPath *path,
  * Returns the object name that is at position @pos in the widget
  * hierarchy defined in @path.
  *
- * Returns: the name or %NULL
+ * Returns: (nullable): the name or %NULL
  *
  * Since: 3.20
  **/
@@ -713,7 +713,7 @@ gtk_widget_path_iter_set_state (GtkWidgetPath *path,
  * the position @pos in the widget hierarchy defined by
  * @path
  *
- * Returns: The widget name, or %NULL if none was set.
+ * Returns: (nullable): The widget name, or %NULL if none was set.
  **/
 const gchar *
 gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
index 9808475f73f5be588da8bb665ebddf940f1b342c..14a11c376e31c988e891694aaee2ff8f63dc9ebe 100644 (file)
@@ -12368,7 +12368,7 @@ _gtk_window_get_popover_position (GtkWindow             *window,
  * Returns the conceptual parent of this popover, the real
  * parent will always be @window.
  *
- * Returns: The conceptual parent widget, or %NULL.
+ * Returns: (nullable): The conceptual parent widget, or %NULL.
  **/
 GtkWidget *
 _gtk_window_get_popover_parent (GtkWindow *window,